|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectagents.anac.y2011.TheNegotiator.Queue
public class Queue
Array-based implementation of the queue.
| Constructor Summary | |
|---|---|
Queue()
Construct the queue. |
|
| Method Summary | |
|---|---|
java.lang.Double |
dequeue()
Return and remove the least recently inserted item from the queue. |
void |
enqueue(java.lang.Double x)
Insert a new item into the queue. |
java.lang.Double |
getFront()
Get the least recently inserted item in the queue. |
boolean |
isEmpty()
Test if the queue is logically empty. |
void |
makeEmpty()
Make the queue logically empty. |
int |
size()
|
java.lang.Double[] |
toArray()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Queue()
| Method Detail |
|---|
public boolean isEmpty()
public void makeEmpty()
public java.lang.Double dequeue()
UnderflowException - if the queue is empty.public java.lang.Double getFront()
UnderflowException - if the queue is empty.public void enqueue(java.lang.Double x)
x - the item to insert.public int size()
public java.lang.Double[] toArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||